/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package state;

import cbaApplication.Files;
import cbaServer.BankServerCBAInterface;
import java.rmi.RemoteException;

/**
 *
 * @author Rente
 */
public class StateOn implements State {

    
    BankServerCBAInterface bankServerInterface;

    public int fazLevantamento(String idConta, double quantia) {
        System.out.println("STAE ON levantamento");
        try {
            return this.bankServerInterface.levantamento(idConta, quantia);
            //throw new UnsupportedOperationException("Not supported yet.");
        } catch (RemoteException ex) {
            System.out.println("Server Down");
        }
        return -1;
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    public BankServerCBAInterface getBankServerInterface() {
        return this.bankServerInterface;
    }

    public void setBankServerInterface(BankServerCBAInterface bankServerInterface) {
        this.bankServerInterface = bankServerInterface;
    }
}
